﻿Imports System.Windows.Forms

Namespace Win
    Public Class HeaderLessTabControl
        Inherits TabControl

        Protected Overloads Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
            ' Hide tabs by trapping the TCM_ADJUSTRECT message 
            If m.Msg = 4904 AndAlso Not DesignMode Then
                m.Result = New IntPtr(1) ' DirectCast(1, IntPtr)
            Else
                MyBase.WndProc(m)
            End If
        End Sub

    End Class
End Namespace